package cn.hairui.blog.repository;

import cn.hairui.blog.mapper.UserMapper;
import cn.hairui.blog.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * @author lihairui
 * @version V1.0
 * @date: 2019/7/31 20:38
 */
@Repository
public class UserRepository {

    @Autowired
    private UserMapper userMapper;

    public User findByUsername(String username) {
        return userMapper.findByUsername(username);
    }

    public User findByUsernameAndPwd(String username, String password) {
        return userMapper.findByUsernameAndPwd(username, password);
    }
}
